package com.jnu.hc.jnuhcusercms.controller;

import com.jnu.hc.jnuhcusercms.dto.CalendarRequestDto;
import com.jnu.hc.jnuhcusercms.dto.CalendarResponseDto;
import com.jnu.hc.jnuhcusercms.dto.ResponseObject;
import com.jnu.hc.jnuhcusercms.service.CalendarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
public class CalendarController {
    @Autowired
    CalendarService calendarService;

    @RequestMapping("/calendarList")
    public ResponseObject calendarList(@RequestBody CalendarRequestDto calendarRequestDto) {
        List<CalendarResponseDto> calendarResponseDtoList= calendarService.appointmentCalendarList(calendarRequestDto);
        return new ResponseObject(ResponseObject.SUCCESS_STATUS,ResponseObject.SUCCESS_DESC,calendarResponseDtoList);
    }

}
